package com.open.cloud.rbac.mapper.orgpost;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.open.cloud.rbac.entity.orgpost.CoreRolePostRel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 角色岗位关联表 Mapper 接口
 * </p>
 *
 * @author wangzengzhou01
 * @since 2024-12-23
 */
@Mapper
public interface CoreRolePostRelMapper extends BaseMapper<CoreRolePostRel> {
    /**
     * 根据postId获取roleId
     *
     * @param postId
     * @return
     */
    public List<String> selectRoleIdByPostId(@Param("postId") String postId);

    /**
     * 批量插入post与role的关联关系
     *
     * @param list
     * @return
     */
    public Integer batchInsertPostRoleRel(@Param("list") ArrayList<CoreRolePostRel> list);
}
